package com.sky.controller.user;

import com.sky.entity.Setmeal;
import com.sky.result.Result;
import com.sky.service.SetmealService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author liuyp
 * @since 2023/09/05
 */
@RestController
@RequestMapping("/user/setmeal")
@Api(tags = "浏览套餐相关接口-C端")
public class UserSetmealController {
    @Autowired
    private SetmealService setmealService;

    @GetMapping("/list")
    @ApiOperation("根据分类id查询套餐列表-C端")
    public Result queryUserSetmeals(Integer categoryId){
        List<Setmeal> setmealList = setmealService.list(categoryId);
        return Result.success(setmealList);
    }
}